<!--
 * @Author: your name
 * @Date: 2021-08-24 15:24:12
 * @LastEditTime: 2021-08-24 16:02:12
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\5-javascript\day02\3-练习.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        //1.验证数据的合法性
        //2.业务处理
        var num = 9;
        if (typeof num == 'number' && num >= 0 && num <= 10) {
            if (num == 0) {
                console.log("零");
            } else if (num == 1) console.log("壹");
            else if (num == 9) console.log("玖");
        } else {
            console.log("非法数值");

        }
        console.log("over");
    </script>

</head>

<body>

</body>

</html>